#include "pthread.hpp"
void* func1(void* arg)
{
    char* buffer = static_cast<char*> (arg);
    int cnt = 6;
    while(cnt)
    {
        std::cout << buffer << std::endl;
        sleep(1);
        cnt--;
    }
    return nullptr;
}



int main()
{
    pthread ph1(func1, (void*)"pthread:1", 1);
    ph1.create();
    int ret = ph1.join();
    if(ret == 0)
        std::cout << "线程回收成功" << std::endl;
    return 0;
}